import logging,yagmail

def log():
    log = logging.basicConfig(
        level=logging.INFO,
        filemode='a+',
        filename=r'E:\gg4\gaoliu\week3_114\log/vip.log',
        format='%(levelname)s-%(filename)s-%(asctime)s-%(message)s-%(lineno)d'
    )
    return log

def mail():
    mail = yagmail.SMTP(user='3080172040@qq.com',password='abhdfnpkqkmadgff',host='smtp.qq.com')
    mail.send(to='3080172040@qq.com',subject='唯品会测试报告',contents=['唯品会测试',r'E:\gg4\gaoliu\week3_114\log/vip.log'])
    mail.close()
